﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Profile;
using System.Web.Security;
using ChoViet.Model;

namespace ChoViet.CMS.ViewModels
{
    public class ProfileCommon : ProfileBase
    {

        [SettingsAllowAnonymous(false)]
        public string FullName
        {
            get { return base["FullName"] as string; }
            set { base["FullName"] = value; }
        }
        [SettingsAllowAnonymous(false)]
        public string Department
        {
            get { return base["Department"] as string; }
            set { base["Department"] = value; }
        }
        [SettingsAllowAnonymous(false)]
        public string DepartmentID
        {
            get { return base["DepartmentID"] as string; }
            set { base["DepartmentID"] = value; }
        }
        [SettingsAllowAnonymous(false)]
        public string Title
        {
            get { return base["Title"] as string; }
            set { base["Title"] = value; }
        }
        [SettingsAllowAnonymous(false)]
        public string Description
        {
            get { return base["Description"] as string; }
            set { base["Description"] = value; }
        }
        [SettingsAllowAnonymous(false)]
        public string ProfessionID
        {
            get { return base["ProfessionID"] as string; }
            set { base["ProfessionID"] = value; }
        }
        //public IList<Organization> Organizations;
        //public IList<Profession> Professions;
        public static ProfileCommon GetUserProfile(string username)
        {
            return Create(username) as ProfileCommon;
        }
        public static ProfileCommon GetUserProfile()
        {
            return Create(Membership.GetUser().UserName) as ProfileCommon;
        }

    }
}